define(['artTemplate' , '../../../common/js/lib/text!../../../tpl/state.tpl' , '../../../common/js/lib/text!../../../tpl/footer.tpl' , '../../../common/js/lib/text!../../../tpl/header.tpl'] ,
 function(artTemplate , stateTpl , footerTpl , headerTpl) {
  function stateV(stateData , headerData){
    var header = artTemplate.compile(headerTpl)(headerData),
        footer = artTemplate.compile(footerTpl)({type:3}),
        state = artTemplate.compile(stateTpl)(stateData);
    $('.webApp-content').html(header+state+footer);
    $('.footer a,.header .back-a').click(function(){
      window.location.reload();
    });
  };
  return stateV;
});
